Optimal. Leaf size=95 \[ -\frac {x^{-2 n}}{4 n}+\frac {x^{-2 n} \cos \left (2 \left (a+b x^n\right )\right )}{4 n}+\frac {b^2 \cos (2 a) \text {Ci}\left (2 b x^n\right )}{n}-\frac {b x^{-n} \sin \left (2 \left (a+b x^n\right )\right )}{2 n}-\frac {b^2 \sin (2 a) \text {Si}\left (2 b x^n\right )}{n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 6, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3506, 3461,
3378, 3384, 3380, 3383} \begin {gather*} \frac {b^2 \cos (2 a) \text {CosIntegral}\left (2 b x^n\right )}{n}-\frac {b^2 \sin (2 a) \text {Si}\left (2 b x^n\right )}{n}-\frac {b x^{-n} \sin \left (2 \left (a+b x^n\right )\right )}{2 n}+\frac {x^{-2 n} \cos \left (2 \left (a+b x^n\right )\right )}{4 n}-\frac {x^{-2 n}}{4 n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3378
Rule 3380
Rule 3383
Rule 3384
Rule 3461
Rule 3506
Rubi steps
\begin {align*} \int x^{-1-2 n} \sin ^2\left (a+b x^n\right ) \, dx &=\int \left (\frac {1}{2} x^{-1-2 n}-\frac {1}{2} x^{-1-2 n} \cos \left (2 a+2 b x^n\right )\right ) \, dx\\ &=-\frac {x^{-2 n}}{4 n}-\frac {1}{2} \int x^{-1-2 n} \cos \left (2 a+2 b x^n\right ) \, dx\\ &=-\frac {x^{-2 n}}{4 n}-\frac {\text {Subst}\left (\int \frac {\cos (2 a+2 b x)}{x^3} \, dx,x,x^n\right )}{2 n}\\ &=-\frac {x^{-2 n}}{4 n}+\frac {x^{-2 n} \cos \left (2 \left (a+b x^n\right )\right )}{4 n}+\frac {b \text {Subst}\left (\int \frac {\sin (2 a+2 b x)}{x^2} \, dx,x,x^n\right )}{2 n}\\ &=-\frac {x^{-2 n}}{4 n}+\frac {x^{-2 n} \cos \left (2 \left (a+b x^n\right )\right )}{4 n}-\frac {b x^{-n} \sin \left (2 \left (a+b x^n\right )\right )}{2 n}+\frac {b^2 \text {Subst}\left (\int \frac {\cos (2 a+2 b x)}{x} \, dx,x,x^n\right )}{n}\\ &=-\frac {x^{-2 n}}{4 n}+\frac {x^{-2 n} \cos \left (2 \left (a+b x^n\right )\right )}{4 n}-\frac {b x^{-n} \sin \left (2 \left (a+b x^n\right )\right )}{2 n}+\frac {\left (b^2 \cos (2 a)\right ) \text {Subst}\left (\int \frac {\cos (2 b x)}{x} \, dx,x,x^n\right )}{n}-\frac {\left (b^2 \sin (2 a)\right ) \text {Subst}\left (\int \frac {\sin (2 b x)}{x} \, dx,x,x^n\right )}{n}\\ &=-\frac {x^{-2 n}}{4 n}+\frac {x^{-2 n} \cos \left (2 \left (a+b x^n\right )\right )}{4 n}+\frac {b^2 \cos (2 a) \text {Ci}\left (2 b x^n\right )}{n}-\frac {b x^{-n} \sin \left (2 \left (a+b x^n\right )\right )}{2 n}-\frac {b^2 \sin (2 a) \text {Si}\left (2 b x^n\right )}{n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 82, normalized size = 0.86 \begin {gather*} \frac {x^{-2 n} \left (-1+\cos \left (2 \left (a+b x^n\right )\right )+4 b^2 x^{2 n} \cos (2 a) \text {Ci}\left (2 b x^n\right )-2 b x^n \sin \left (2 \left (a+b x^n\right )\right )-4 b^2 x^{2 n} \sin (2 a) \text {Si}\left (2 b x^n\right )\right )}{4 n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 89, normalized size = 0.94
method | result | size |
default | \(-\frac {x^{-2 n}}{4 n}-\frac {2 b^{2} \left (-\frac {x^{-2 n} \cos \left (2 a +2 b \,x^{n}\right )}{8 b^{2}}+\frac {\sin \left (2 a +2 b \,x^{n}\right ) x^{-n}}{4 b}+\frac {\sinIntegral \left (2 b \,x^{n}\right ) \sin \left (2 a \right )}{2}-\frac {\cosineIntegral \left (2 b \,x^{n}\right ) \cos \left (2 a \right )}{2}\right )}{n}\) | \(89\) |
risch | \(\frac {i b^{2} {\mathrm e}^{-2 i a} \pi \,\mathrm {csgn}\left (b \,x^{n}\right )}{2 n}-\frac {i b^{2} {\mathrm e}^{-2 i a} \sinIntegral \left (2 b \,x^{n}\right )}{n}-\frac {b^{2} {\mathrm e}^{-2 i a} \expIntegral \left (1, -2 i b \,x^{n}\right )}{2 n}-\frac {b^{2} {\mathrm e}^{2 i a} \expIntegral \left (1, -2 i b \,x^{n}\right )}{2 n}-\frac {x^{-2 n}}{4 n}+\frac {x^{-2 n} \cos \left (2 a +2 b \,x^{n}\right )}{4 n}-\frac {b \sin \left (2 a +2 b \,x^{n}\right ) x^{-n}}{2 n}\) | \(141\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.43, size = 107, normalized size = 1.13 \begin {gather*} \frac {b^{2} x^{2 \, n} \cos \left (2 \, a\right ) \operatorname {Ci}\left (2 \, b x^{n}\right ) + b^{2} x^{2 \, n} \cos \left (2 \, a\right ) \operatorname {Ci}\left (-2 \, b x^{n}\right ) - 2 \, b^{2} x^{2 \, n} \sin \left (2 \, a\right ) \operatorname {Si}\left (2 \, b x^{n}\right ) - 2 \, b x^{n} \cos \left (b x^{n} + a\right ) \sin \left (b x^{n} + a\right ) + \cos \left (b x^{n} + a\right )^{2} - 1}{2 \, n x^{2 \, n}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\sin \left (a+b\,x^n\right )}^2}{x^{2\,n+1}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________